#include "TreeManager.h"
#include <iostream>
using namespace std;
static const string FILE_PATH = "d:\tree.txt";
int main()
{
	TreeManager experimentalTree;
	bool buildTreeSuccessful = experimentalTree.BuildTree();
	if (buildTreeSuccessful)
	{
		bool saveTreeStatus = experimentalTree.Save(FILE_PATH);
		if (saveTreeStatus == true)
		{
			cout << "Your tree was successfully saved in file"
				<< endl << FILE_PATH.c_str() << '.' << endl;
		}
		else
		{
			cout << "There were some problems when saving tree." << endl
				<< "Tree was not saved or it was saved with errors." << endl;
		}
		TreeManager treeToRestore(FILE_PATH);
	}
	else
	{
		cout << "Tree was not built successfully. Terminating program." << endl;
	}
	cin.get();
	return 0;
}